/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Data.Diagram;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import java.lang.System;

/**
 *
 * @author Sean
 */
public class Actor extends Diagram{
    private String FileName;
    private String Name;
    private int x, y;

public Actor(String name, int x, int y) {
        this.x = x;
        this.y = y;
        this.Name = name;
    }

    //@Override
    public void draw(Graphics g) {
        //Load Image
        BufferedImage actorImage = null;
        try {
            actorImage = ImageIO.read(new File("images/actorSmall.png"));
        } catch (IOException e) {
            e.printStackTrace(System.out);
        }
        //Cast to 2dDrawing
        Graphics2D drawing = (Graphics2D)g;

        //Draw the image and text to screen
        drawing.drawString(Name, x, y);
        drawing.drawImage(actorImage, null, x, y);
    }
}
